let myUploadFile = {
	uploadFile: function(filePath,fileName,token) { 
		return new Promise(async (resolve, reject) => {
			wx.uploadFile({
				url: 'https://print.net-frog.com/api/file/upload',
				// url: 'http://10.22.75.241:3000/api/file/upload',
				filePath: filePath,
				name: 'file',
				header: {
					'content-type': 'multipart/form-data',
					// 'authorized': token
					'authorization': token,
				},
				formData: {
					'fileName':fileName
				},
				success(res) {
					resolve(res);
				},
				fail(res) {
			
					reject(res)
				}
			})
		})
	}
}

export default myUploadFile;
 